<script setup lang='ts'>
// emits的类型标注
    type Emits = {
        (e: 'getMsg', msg: string): void
    }
    const emit = defineEmits<Emits>()

    const send = ()=>{
        emit('getMsg', '我是son组件的数据')
    }
</script>
<template>
<div>
  hello vue
  <button @click="send">点我</button>
</div>
</template>
<style scoped>
</style>